<template>
    <div v-bind:class="obj">hehe</div>
    <button @click="aaa">修改</button>
</template>

<script setup>
    import {ref,reactive} from 'vue';
    const className = ref("test");
    const isAAA = ref(true);
    const aaa = ()=>{
        isAAA.value = !isAAA.value;        
    }
    const obj = reactive({test:isAAA.value});
</script>

<style>
.test {
    background-color: pink;
}
</style>